#ifndef RESETPASSWORD_H
#define RESETPASSWORD_H

#include <QWidget>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QMessageBox>
#include <QSqlDatabase>

class resetPassWord : public QWidget
{
    Q_OBJECT
public:
    explicit resetPassWord(QWidget *parent = nullptr);

signals:


private:
    //数据库链接对象
    QSqlDatabase db;

    QWidget* mainWidget;
    QVBoxLayout* mainLayout;

    QLabel* user;
    QLineEdit* userEdit;
    QHBoxLayout* userLayout;


    QLabel* name;
    QLineEdit* nameEdit;
    QHBoxLayout* nameLayout;

    QLabel* phone;
    QLineEdit* phoneEdit;
    QHBoxLayout* phoneLayout;


    QLabel* pwd;
    QLineEdit* pwdEdit;
    QHBoxLayout* pwdLayout;

    QLabel* repeatPwd;
    QLineEdit* repeatPwdEdit;
    QHBoxLayout* repeatPwdLayout;

    //验证提交按钮
    QPushButton* submitBtn;

    QString userStr;
    QString nameStr;
    QString phoneStr;
    QString pwdStr;
    QString repeatPwdStr;


    //错误提示
    QLabel * msg;

    void on_closeBtn_released();

    //初始化
    void init();

    //获取链接
    void getConnect();


};

#endif // RESETPASSWORD_H
